package com.itbaizhan.shopping_common.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itbaizhan.shopping_common.pojo.Specification;
import com.itbaizhan.shopping_common.pojo.SpecificationOptions;

import java.util.List;

/**
 * @program: shopping
 * @InterfaceName SpecificationService
 * @description: 商品规格服务
 * @author: jing
 * @create: 2025-06-22 16:08
 **/
public interface SpecificationService {

    //新增商品规格
    void add(Specification specification);
    //修改商品规格
    void update(Specification specification);
    //删除商品规格
    void delete(Long[] ids);
    //根据id查询商品规格
    Specification findById(Long id);
    //分页查询商品规格
    Page<Specification> search(int page,int size);

    //根据商品类型查询商品规格（查询某种商品类型下的所有商品规格）
    List<Specification> findByProductTypeId(Long id);


    //新增商品规格项
    void addOption(SpecificationOptions specificationOptions);
    //删除商品规格项
    void deleteOptions(Long[] ids);
}
